package com.example.mapper;


import com.example.pojo.Runtime.OmDrools;
import com.example.pojo.Runtime.omRuntimeDtl;
import com.example.pojo.dev.fmRoominfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @BelongsProject: parem-yunstiu
 * @BelongsPackage: com.yunsitu.mapper
 * @Author: dyz
 * @CreateTime: 10:52
 * @Version: 1.0
 */
@Repository
public interface omMapper {


    //去重查询有运行时长的设备
    List<omRuntimeDtl> disNameandposition();

    List<omRuntimeDtl> disNameanddbid();



    //g根据设备名查询测点
    List<String> dispointName(@Param("dbid") int dbid);


    //根据测点查询运行时长表的变量
    List<String> disvarName(@Param("pointName") String pointName);

    //根据测点查询运行时长表的变量 变量id
    List<omRuntimeDtl> disvarNameandvarid(@Param("pointName") String pointName);


    //获取这个设备的运行时长
    Double selectdevRuntime(@Param("varId") int varId);


    //查询设备 是否存入
    // OmDrools getOmDroolsbydbIdandposition(int dbId,String maintainType,String variableName);
    //获取保养的时间
    OmDrools getOmDroolsbydbIdandposition(int dbId, String maintainType, int varId);

    //获取保养的时间
    OmDrools getOmDroolsbydbId(int dbId, String maintainType);


    //添加保养时间
    int insertOmDrools(OmDrools omDrools);

    //修改保养时间
    int updateOmDroolsbyposition(OmDrools omDrools);

    int updateOmDrools(OmDrools omDrools);

    //查询运行时长的第一条数据
    omRuntimeDtl getDatalimit1byvarId(int varId);

    //修改是否处理
    int updatehandle(@Param("dbid") int dbid, @Param("maintainType") String maintainType, @Param("handle") Boolean handle);


    fmRoominfo selectfloorbydeviceName(int dbid, String modelId);
}
